<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>

<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<html>
<head>
	<style type="text/css">
		.img{
			height: 40;
		}
		.font{
			color:white;
			font-size: 17px;
		}
		.font1{
			color:white;
			font-size: 30px;
		}
		.round {
		   padding:10px; width:300px; height:50px;
		   border: 0px solid #dedede;
		   -moz-border-radius: 5px;      /* Gecko browsers */
		   -webkit-border-radius: 5px;   /* Webkit browsers */
		   border-radius:5px;            /* W3C syntax */
}
	</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录界面</title>
   <script type="text/javascript">
    		function login(){ 
    			if(document.getElementById("username").value==""&&document.getElementById("password").value==""){
    				alert("请输入正确的账号和密码")
    			}else{
    				var params ={username:$("#username").val(),password:$("#password").val()};
        			$.ajax({
        				url:"${path}/weixinbassm/user/addlogin",
        				data:params,
        				dataType:"json",
        				type:"post",
        				async:false,
        				success:function(date){
        					debugger;
        					if(date.msg== 1){ 
        						alert("请输入正确的账号和密码")
    						}else if(date.msg==200){
    							if(date.qx==1){
    							
    								window.location.href = "${path}/weixinbassm/user/visitorsuser1";
    							}
    							if(date.qx==2){
    								var urluser=date.numbers;
    								window.location.href ="${path}/weixinbassm/user/visitorsuser2?Celladdress="+urluser;
    							}
    							if(date.qx==3){
    								var urluser=date.numbers;
    								window.location.href = "${path}/weixinbassm/Visitor/visitorsuser3?Celladdress="+urluser;
    							}
    							
    						}
        				},
        				error:function(){
        					alert("数据加载失败");
        				}
        			});
    			}
    		};
  
    
    </script>



	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

</head>
<body onkeydown="keyLogin();" style="background-color:#f2f3f4 ">
 
  	<div class="container">
      <div class="row">
        <div class="col-min-12">
        <table border="0" align="center" style="width: 100%">
        <tr style="height: 480px">
        </tr>
        <tr align="center">
        	<td style="height: 280px;width: 300px">
        	<img src="img/webwxgetmsgimg.jpg" style="width: 100%;height: 100%">
        	</td>
       	</tr>
       	<tr style="height: 20px">
       	</tr>
       	<tr align="center">
       		<td><input type="text" name="username" id="username" style="width: 750px; height: 90px; font-size: 35; "placeholder="&nbsp;&nbsp;&nbsp;请&nbsp;&nbsp;&nbsp;输&nbsp;&nbsp;&nbsp;入&nbsp;&nbsp;&nbsp;账&nbsp;&nbsp;&nbsp;号" s /></td>
       	</tr>

       	<tr align="center">
       		<td><input type="password" name="password" id="password" style="width: 750px; height: 90px;font-size: 35" placeholder="&nbsp;&nbsp;&nbsp;请&nbsp;&nbsp;&nbsp;输&nbsp;&nbsp;&nbsp;入&nbsp;&nbsp;&nbsp;你&nbsp;&nbsp;&nbsp;的&nbsp;&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;码"/></td>
       	</tr>
    	<tr height="200" bgcolor="#F2F3F4">
    		<td  align="center">
    			<button style="width: 440px; height:100px; background-color:#27a2f0; color: white; font-size: 17px;" onclick="login()"  class="round"><font size="20">登录</font></button>
    		</td>
    	</tr>
    </table>
        </div>
      </div>
    </div>
  </body>
</html>
